package com.usian.service.impl;

import com.usian.mapper.UserMapper;
import com.usian.pojo.User;
import com.usian.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public void insertUser(User user) {
        userMapper.insertUser(user);
    }

    @Override
    public List<User> fingAll(Integer userId) {
        return userMapper.fingAll(userId);
    }

    @Override
    public List<User> findList() {
        return userMapper.findList();
    }

    @Override
    public void del(Integer userId) {
       userMapper.del(userId);
    }

    @Override
    public void update(User user) {
        userMapper.update(user);
    }

    @Override
    public User upd(Integer userId) {
        return userMapper.upd(userId);
    }

    @Override
    public void findDate() {
        System.out.println("时间："+new Date());
    }
}
